package com.wits.qso.dao.impl;

import java.util.List;

import javax.persistence.Query;

import org.springframework.stereotype.Component;

import com.wits.platform.dao.impl.BaseDaoImpl;
import com.wits.qso.dao.custom.AidDaoCustom;
import com.wits.qso.entity.Aid;
import com.wits.qso.entity.CreContent;

@Component
public class AidDaoImpl extends BaseDaoImpl<Aid, String> implements AidDaoCustom {

	@Override
	public List<Aid> findByCreContent(CreContent crecontent) {
		Query query = em.createQuery( "FROM Aid o WHERE o.crecntid = :crecontent" );
		query.setParameter( "crecontent", crecontent );
		
		return query.getResultList();
	}

}
